package com.probiz.estore.common.model.content.base;

import java.io.Serializable;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import com.probiz.estore.common.model.content.SearchWord;

/**
 * SearchWord Base Java Bean, base class for the model, mapped directly to database table
 * 
 * Avoid changing this file if not necessary, will be overwritten. 
 *
 */
public class SearchWordTbl extends com.probiz.estore.core.model.BaseObject implements Serializable {

    protected Integer searchWordId;
	protected String searchWord;
	protected java.util.Date updateTime;
	protected Integer searchTimes;
	protected Integer version;


	/**
	 * Default Empty Constructor for class SearchWord
	 */
	public SearchWordTbl () {
		super();
	}
	
	/**
	 * Default Key Fields Constructor for class SearchWord
	 */
	public SearchWordTbl (
		 Integer in_searchWordId
        ) {
		this.setSearchWordId(in_searchWordId);
    }

    

	/**
	 * 
	 * @return Integer
     * @hibernate.id column="searchWordId" type="java.lang.Integer" generator-class="native"
	 */
	public Integer getSearchWordId() {
		return this.searchWordId;
	}
	
	/**
	 * Set the searchWordId
	 */	
	public void setSearchWordId(Integer aValue) {
		this.searchWordId = aValue;
	}	

	/**
	 * 
	 * @return String
	 * @hibernate.property column="searchWord" type="java.lang.String" length="512" not-null="true" unique="false"
	 */
	public String getSearchWord() {
		return this.searchWord;
	}
	
	/**
	 * Set the searchWord
	 * @spring.validator type="required"
	 */	
	public void setSearchWord(String aValue) {
		this.searchWord = aValue;
	}	

	/**
	 * 
	 * @return java.util.Date
	 * @hibernate.property column="updateTime" type="java.util.Date" length="19" not-null="false" unique="false"
	 */
	public java.util.Date getUpdateTime() {
		return this.updateTime;
	}
	
	/**
	 * Set the updateTime
	 */	
	public void setUpdateTime(java.util.Date aValue) {
		this.updateTime = aValue;
	}	

	/**
	 * 
	 * @return Integer
	 * @hibernate.property column="searchTimes" type="java.lang.Integer" length="11" not-null="false" unique="false"
	 */
	public Integer getSearchTimes() {
		return this.searchTimes;
	}
	
	/**
	 * Set the searchTimes
	 */	
	public void setSearchTimes(Integer aValue) {
		this.searchTimes = aValue;
	}	

	/**
	 * 
	 * @return Integer
	 * @hibernate.property column="version" type="java.lang.Integer" length="11" not-null="true" unique="false"
	 */
	public Integer getVersion() {
		return this.version;
	}
	
	/**
	 * Set the version
	 * @spring.validator type="required"
	 */	
	public void setVersion(Integer aValue) {
		this.version = aValue;
	}	

	/**
	 * @see java.lang.Object#equals(Object)
	 */
	public boolean equals(Object object) {
		if (!(object instanceof SearchWord)) {
			return false;
		}
		SearchWord rhs = (SearchWord) object;
		return new EqualsBuilder()
				.append(this.searchWordId, rhs.searchWordId)
				.append(this.searchWord, rhs.searchWord)
				.append(this.updateTime, rhs.updateTime)
				.append(this.searchTimes, rhs.searchTimes)
				.append(this.version, rhs.version)
				.isEquals();
	}

	/**
	 * @see java.lang.Object#hashCode()
	 */
	public int hashCode() {
		return new HashCodeBuilder(-82280557, -700257973)
				.append(this.searchWordId) 
				.append(this.searchWord) 
				.append(this.updateTime) 
				.append(this.searchTimes) 
				.append(this.version) 
				.toHashCode();
	}

	/**
	 * @see java.lang.Object#toString()
	 */
	public String toString() {
		return new ToStringBuilder(this)
				.append("searchWordId", this.searchWordId) 
				.append("searchWord", this.searchWord) 
				.append("updateTime", this.updateTime) 
				.append("searchTimes", this.searchTimes) 
				.append("version", this.version) 
				.toString();
	}

	/**
	 * Return the name of the first key column
	 */
	public String getFirstKeyColumnName() {
		return "searchWordId";
	}
	
}